import React from 'react'
import {Image, ScrollView, Text, View} from "react-native";
import List from "@ant-design/react-native/es/list/index";
import InputItem from "@ant-design/react-native/es/input-item/index";
import CameraButton from "../../contants/CameraButton";
import Flex from "@ant-design/react-native/es/flex/Flex";
import WhiteSpace from "@ant-design/react-native/es/white-space/index";
import WingBlank from "@ant-design/react-native/es/wing-blank/index";
import Button from "@ant-design/react-native/es/button/index";

export default class NewCar extends React.Component {
  state = {
    value: ''
  }

  render() {
    return <ScrollView style={{height: '100%', backgroundColor: '#fff'}}>
      <List>
        <InputItem value="" placeholder="下拉选择？">
          车型
        </InputItem>
        <InputItem type='number' value="" placeholder="请输入">
          年限
        </InputItem>
        <InputItem value="" placeholder="请输入">
          司机
        </InputItem>
        <InputItem type='number' value="" placeholder="请输入">
          驾龄
        </InputItem>
        <WingBlank type={'lg'}>
          <WhiteSpace size={'lg'}/>
          <Text>驾驶证照片</Text>
          <Flex style={{height: 100, padding: 10}} direction={'row'} justify='around'>
            <CameraButton
              photos={[]}
              onFileUpload={this.onFileUpload}>

              <Image source={{uri: 'https://org.modao.cc/uploads4/images/3133/31336283/v2_pnxd2q.png'}}
                     style={{height: 80, width: 80}}/>
              <Text>正面</Text>
            </CameraButton>

            <CameraButton
              photos={[]}
              onFileUpload={this.onFileUpload}>

              <Image source={{uri: 'https://org.modao.cc/uploads4/images/3133/31336283/v2_pnxd2q.png'}}
                     style={{height: 80, width: 80}}/>
              <Text>反面</Text>
            </CameraButton>
          </Flex>

          <WhiteSpace size={'lg'}/>
          <Text>年检报告</Text>
          <CameraButton
            photos={[]}
            onFileUpload={this.onFileUpload}>

            <Image source={{uri: 'https://org.modao.cc/uploads4/images/3133/31336283/v2_pnxd2q.png'}}
                   style={{height: 80, width: 80}}/>
          </CameraButton>
          <WhiteSpace size={'lg'}/>
          <Text>车辆照片</Text>
          <CameraButton
            photos={[]}
            onFileUpload={this.onFileUpload}>

            <Image source={{uri: 'https://org.modao.cc/uploads4/images/3133/31336283/v2_pnxd2q.png'}}
                   style={{height: 80, width: 80}}/>
          </CameraButton>
          <Button type={'primary'}>保存</Button>
        </WingBlank>
      </List>
    </ScrollView>
  }
}